package com.yanqu.road.entity.activity.washe.jinbiao;

import com.alibaba.fastjson.annotation.JSONField;
import com.yanqu.road.entity.DataObject;
import com.yanqu.road.entity.DataStatus;
import com.yanqu.road.entity.FieldTypeAnnotation;
import com.yanqu.road.entity.activity.washe.config.WasheConfig;
import com.yanqu.road.entity.activity.washe.game.WasheRoomData;

/**
 * 巅峰赛对战信息
 */
@FieldTypeAnnotation(tableName = "t_n_washe_jinbiao_peak_battle")
public class WasheJinBiaoPeakBattleData extends DataObject {

    @FieldTypeAnnotation(desc = "赛季，初始-1")
    private int seasonId = WasheConfig.SEASON_ID_NULL;

    @FieldTypeAnnotation(desc = "轮次")
    private int round;

    @FieldTypeAnnotation(desc = "玩家1服务器id")
    private long serverId1;
    @FieldTypeAnnotation(desc = "玩家1用户id")
    private long userId1;

    @FieldTypeAnnotation(desc = "玩家1积分，不含托管积分")
    private long score1;

    @FieldTypeAnnotation(desc = "玩家2服务器id")
    private long serverId2;
    @FieldTypeAnnotation(desc = "玩家2用户id")
    private long userId2;

    @FieldTypeAnnotation(desc = "玩家2积分，不含托管积分")
    private long score2;

    @FieldTypeAnnotation(desc = "对局结果")
    private int battleResult;

    /**
     * 房间数据
     */
    @JSONField(serialize = false)
    private WasheRoomData roomData;

    public WasheJinBiaoPeakBattleData() {

    }

    public int getSeasonId() {
        return seasonId;
    }

    public void setSeasonId(int seasonId) {
        if (this.seasonId != seasonId) {
            this.seasonId = seasonId;
            setOp(DataStatus.Update);
        }
    }

    public int getRound() {
        return round;
    }

    public void setRound(int round) {
        if (this.round != round) {
            this.round = round;
            setOp(DataStatus.Update);
        }
    }

    public long getServerId1() {
        return serverId1;
    }

    public void setServerId1(long serverId1) {
        if (this.serverId1 != serverId1) {
            this.serverId1 = serverId1;
            setOp(DataStatus.Update);
        }
    }

    public long getUserId1() {
        return userId1;
    }

    public void setUserId1(long userId1) {
        if (this.userId1 != userId1) {
            this.userId1 = userId1;
            setOp(DataStatus.Update);
        }
    }

    public long getServerId2() {
        return serverId2;
    }

    public void setServerId2(long serverId2) {
        if (this.serverId2 != serverId2) {
            this.serverId2 = serverId2;
            setOp(DataStatus.Update);
        }
    }

    public long getUserId2() {
        return userId2;
    }

    public void setUserId2(long userId2) {
        if (this.userId2 != userId2) {
            this.userId2 = userId2;
            setOp(DataStatus.Update);
        }
    }

    public WasheRoomData getRoomData() {
        return roomData;
    }

    public void setRoomData(WasheRoomData roomData) {
        this.roomData = roomData;
    }

    public int getBattleResult() {
        return battleResult;
    }

    public void setBattleResult(int battleResult) {
        if (this.battleResult != battleResult) {
            this.battleResult = battleResult;
            setOp(DataStatus.Update);
        }
    }

    public long getScore1() {
        return score1;
    }

    public void setScore1(long score1) {
        if (this.score1 != score1) {
            this.score1 = score1;
            setOp(DataStatus.Update);
        }
    }

    public long getScore2() {
        return score2;
    }

    public void setScore2(long score2) {
        if (this.score2 != score2) {
            this.score2 = score2;
            setOp(DataStatus.Update);
        }
    }
}
